<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wechat_kf_default', function (Blueprint $table) {
            $table->id();
            $table->string('corp_id')->default('')->comment('企业ID');
            $table->string('open_kfid')->default('')->comment('客服ID');
            $table->string('content')->default('')->comment('欢迎语');
            $table->timestamps();
            $table->softDeletes();
        });


        Schema::create('wechat_kf_welcome', function (Blueprint $table) {
            $table->id();
            $table->string('corp_id')->default('')->comment('企业ID');
            $table->string('open_kfid')->default('')->comment('客服ID');
            $table->string('content')->default('')->comment('欢迎语');
            $table->timestamps();
            $table->softDeletes();
        });


        Schema::create('wechat_kf_keyword', function (Blueprint $table) {
            $table->id();
            $table->string('corp_id')->default('')->comment('企业ID');
            $table->string('open_kfid')->default('')->comment('客服ID');
            $table->string('msg_type')->default('')->comment('消息类型');
            $table->string('keyword')->default('')->comment('关键字');
            $table->string('content')->default('')->comment('消息内容');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wechat_kf_default');
        Schema::dropIfExists('wechat_kf_welcome');
        Schema::dropIfExists('wechat_kf_keyword');
    }
};
